package com.iqismart.shorturl.model;

import com.iqismart.shorturl.vo.ReportResponse;
import org.springframework.beans.BeanUtils;

import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;

/**
 * @Description
 * @Auther sty
 * @createTime 2019-10-14 11:19
 */
@Entity
@Table(indexes = {@Index(name="uidIndex", columnList="uid")} )
public class EntityReport extends BaseEntity<ReportResponse> {
    private String url;
    private String name;
    private String contact;
    private Integer status = 0;//0待处理 1属实已停止访问 -1忽略

    private Long uid = 0L;

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getContact() {
        return contact;
    }

    public void setContact(String contact) {
        this.contact = contact;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public ReportResponse toResponse() {
        final ReportResponse respo = new ReportResponse();
        BeanUtils.copyProperties(this,respo);
        return respo;
    }
}
